# /**
# * Copyright (c) 2022 Beijing Jiaotong University
# * photlab is licensed under [Open Source License].
# * You can use this software according to the terms and conditions of the [Open Source License].
# *
# * You may obtain a copy of [Open Source License] at: [https://open.source.license/]
# *
# * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
# * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
# * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
# *
# * See the [Open Source License] for more details.
# */
# /**
# * Author: Shihao Xie
# * Created: Aug. 31, 2022
# * Supported by: National Key Research and Development Program of China
# */
# interface count = 10
# thrift --gen py ./interface/project_service.thrift
namespace py phot_server.rpc.project_service
namespace js photlab.project_service

include "common_data_type.thrift"
include "file_data_type.thrift"
include "project_data_type.thrift"

service Project{

    list<file_data_type.PhotFile> open_directory(1:string directory_path) throws (1:common_data_type.PhotError error)

    file_data_type.PhotFile open_file(1:string file_path) throws (1:common_data_type.PhotError error)

    project_data_type.ProjectConfig new_project(1:string project_path, 2:string project_name, 3:project_data_type.ProjectType project_type)
                                    throws (1:common_data_type.PhotError error)

    project_data_type.ProjectConfig open_project(1:string project_path) throws (1:common_data_type.PhotError error)

    void close_project(1:string project_name, 2:string window_config) throws (1:common_data_type.PhotError error)

    project_data_type.ProjectConfig refresh_project(1:string project_id) throws (1:common_data_type.PhotError error)

    void new_directory(1:string directory_path) throws (1:common_data_type.PhotError error)

    void new_file(1:string file_path, 2:file_data_type.PhotFile file_object) throws (1:common_data_type.PhotError error)

    void delete_file(1:string file_path) throws (1:common_data_type.PhotError error)

    void save_file(1:string file_path, 2:file_data_type.PhotFile file_object) throws (1:common_data_type.PhotError error)
}
